﻿<%@ Page Title="基础数据查询" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="SearchBase.aspx.cs" Inherits="tmsWeb.SearchBase" %>

<%@ Register Assembly="weblib" Namespace="micsun.Web.WebControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderBody" runat="server">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table border="0" cellpadding="0" cellspacing="0" width="100%" class="input_1" style="width: 100%">
                <tr>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr height="30">
                                <td align="center" style="font-size: medium">
                                    基础数据查询
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr height="30">
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" OnMenuItemClick="Menu1_MenuItemClick"
                                        DynamicEnableDefaultPopOutImage="False" StaticEnableDefaultPopOutImage="False">
                                        <StaticMenuStyle CssClass="menu" Font-Strikeout="False" />
                                        <StaticMenuItemStyle CssClass="menuItem" />
                                        <StaticSelectedStyle CssClass="menuSelectedItem" />
                                        <DynamicMenuStyle CssClass="menuPopup" />
                                        <DynamicMenuItemStyle CssClass="menuPopupItem" Font-Strikeout="False" />
                                        <DynamicHoverStyle CssClass="menuPopupItem" />
                                        <Items>
                                            <asp:MenuItem Text="测温场所" Value="0" Selected="True"></asp:MenuItem>
                                            <asp:MenuItem Text="测温设备" Value="1"></asp:MenuItem>
                                        </Items>
                                    </asp:Menu>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="tabcontent" style="border-width: thin">
                        <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                            <asp:View ID="Tab1" runat="server">
                                <table width="100%" align="center">
                                    <tr>
                                        <td valign="middle" nowrap align="center" height="30">
                                            快速定位：<asp:DropDownList ID="SelectType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="SelectType_SelectedIndexChanged">
                                                <asp:ListItem Selected="True" Value="0">变电站</asp:ListItem>
                                                <asp:ListItem Value="1">机柜</asp:ListItem>
                                            </asp:DropDownList>
                                            &nbsp;<asp:DropDownList ID="SelectList" ForeColor="Black" BackColor="#c0c0c0" runat="server"
                                                Width="120px">
                                            </asp:DropDownList>
                                            <asp:DropDownList ID="SelectLogic" ForeColor="Black" BackColor="#c0c0c0" runat="server"
                                                Width="50px">
                                                <asp:ListItem Value="Like">包含</asp:ListItem>
                                                <asp:ListItem Value="=">等于</asp:ListItem>
                                                <asp:ListItem Value="&gt;">大于</asp:ListItem>
                                                <asp:ListItem Value="&lt;">小于</asp:ListItem>
                                            </asp:DropDownList>
                                            &nbsp;
                                            <asp:TextBox ID="txtContent" runat="server" Width="120px" CssClass="input_1"></asp:TextBox>&nbsp;
                                            <asp:CheckBox ID="TwoCbx" runat="server" Text="二次查询" Font-Names="宋体" ForeColor="#6699FF">
                                            </asp:CheckBox>&nbsp;
                                            <asp:Button ID="SelectBtn" Font-Size="9pt" runat="server" Text="查询" CssClass="input_1"
                                                OnClick="SelectBtn_Click" Width="40px"></asp:Button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top">
                                            <cc1:GridViewPlus2 ID="ResultDG" runat="server" Width="100%" AllowCustomPaging="True"
                                                AllowPaging="True" AutoGenerateColumns="False" PageSize="15" CellPadding="4"
                                                ForeColor="#333333" GridLines="None" BorderColor="#657F93" BorderStyle="Solid"
                                                BorderWidth="1px">
                                                <PagerStyle NextPageText="&gt;&gt;" PrevPageText="&lt;&lt;" PageButtonCount="10"
                                                    BackColor="#284775" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
                                                <Columns>
                                                    <asp:TemplateColumn>
                                                        <ItemTemplate>
                                                            <asp:Label ID="TempLabel" runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="30px" />
                                                    </asp:TemplateColumn>
                                                    <asp:BoundColumn DataField="SiteID" HeaderText="场所编号" />
                                                    <asp:BoundColumn DataField="SiteName" HeaderText="场所名称" />
                                                    <asp:TemplateColumn HeaderText="当前状态">
                                                        <ItemTemplate>
                                                             <%#commfuncs.Search.SearchBL.GetSpSiteStateDes(DataBinder.Eval(Container, "DataItem.SiteID").ToString(), SelectType.SelectedIndex+1)%>
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                </Columns>
                                                <ItemStyle ForeColor="#333333" BackColor="#F7F6F3"></ItemStyle>
                                                <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle ForeColor="White" BackColor="#5D7B9D" Font-Bold="True"></HeaderStyle>
                                                <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                                                <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                                                <EditItemStyle BackColor="#999999" />
                                            </cc1:GridViewPlus2>
                                        </td>
                                    </tr>
                                </table>
                            </asp:View>
                            <asp:View ID="Tab2" runat="server">
                                <table width="100%" align="center">
                                    <tr>
                                        <td valign="middle" nowrap align="center" height="30">
                                            快速定位：<asp:DropDownList ID="SelectType1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="SelectType1_SelectedIndexChanged">
                                                <asp:ListItem Selected="True" Value="t_collections">集中器</asp:ListItem>
                                                <asp:ListItem Value="t_repeaters">中继器</asp:ListItem>
                                                <asp:ListItem Value="t_sensors">传感器</asp:ListItem>
                                            </asp:DropDownList>
                                            &nbsp;<asp:DropDownList ID="SelectList1" ForeColor="Black" BackColor="#c0c0c0" runat="server"
                                                Width="120px">
                                            </asp:DropDownList>
                                            <asp:DropDownList ID="SelectLogic1" ForeColor="Black" BackColor="#c0c0c0" runat="server"
                                                Width="50px">
                                                <asp:ListItem Value="Like">包含</asp:ListItem>
                                                <asp:ListItem Value="=">等于</asp:ListItem>
                                                <asp:ListItem Value="&gt;">大于</asp:ListItem>
                                                <asp:ListItem Value="&lt;">小于</asp:ListItem>
                                            </asp:DropDownList>
                                            &nbsp;
                                            <asp:TextBox ID="txtContent1" runat="server" Width="120px" CssClass="input_1" Height="20px"></asp:TextBox>&nbsp;
                                            <asp:CheckBox ID="TwoCbx1" runat="server" Text="二次查询" Font-Names="宋体" ForeColor="#6699FF">
                                            </asp:CheckBox>&nbsp;
                                            <asp:Button ID="SelectBtn1" Font-Size="9pt" runat="server" Text="查询" CssClass="input_1"
                                                OnClick="SelectBtn_Click" Width="40px"></asp:Button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top">
                                            <asp:MultiView ID="MultiView2" runat="server" ActiveViewIndex="0">
                                                <asp:View ID="View1" runat="server">
                                                    <cc1:GridViewPlus2 ID="ResultDG1" runat="server" Width="100%" AllowCustomPaging="True"
                                                        AllowPaging="True" AutoGenerateColumns="False" PageSize="15" CellPadding="4"
                                                        ForeColor="#333333" GridLines="None" BorderColor="#657F93" BorderStyle="Solid"
                                                        BorderWidth="1px">
                                                        <PagerStyle NextPageText="&gt;&gt;" PrevPageText="&lt;&lt;" PageButtonCount="10"
                                                            BackColor="#284775" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
                                                        <Columns>
                                                            <asp:TemplateColumn>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="TempLabel" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                                <HeaderStyle Width="30px" />
                                                            </asp:TemplateColumn>
                                                            <asp:BoundColumn DataField="CltKey" HeaderText="编号" />
                                                            <asp:BoundColumn DataField="CltName" HeaderText="名称" />
                                                            <asp:BoundColumn DataField="tsn" HeaderText="安装场所" />
                                                            <asp:BoundColumn DataField="RptNumber" HeaderText="中继器数" />
                                                            <asp:BoundColumn DataField="SsrNumber" HeaderText="传感器数" />
                                                            <asp:TemplateColumn HeaderText="当前状态">
                                                                <ItemTemplate>
                                                                    <%#commfuncs.Search.SearchBL.GetSpRptStateDes(DataBinder.Eval(Container, "DataItem.CltKey").ToString())%>
                                                                </ItemTemplate>
                                                            </asp:TemplateColumn>
                                                        </Columns>
                                                        <ItemStyle ForeColor="#333333" BackColor="#F7F6F3"></ItemStyle>
                                                        <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                        <HeaderStyle ForeColor="White" BackColor="#5D7B9D" Font-Bold="True"></HeaderStyle>
                                                        <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                                                        <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                                                        <EditItemStyle BackColor="#999999" />
                                                    </cc1:GridViewPlus2>
                                                </asp:View>
                                                <asp:View ID="View2" runat="server">
                                                    <cc1:GridViewPlus2 ID="GridViewPlus1" runat="server" Width="100%" AllowCustomPaging="True"
                                                        AllowPaging="True" AutoGenerateColumns="False" PageSize="15" CellPadding="4"
                                                        ForeColor="#333333" GridLines="None" BorderColor="#657F93" BorderStyle="Solid"
                                                        BorderWidth="1px">
                                                        <PagerStyle NextPageText="&gt;&gt;" PrevPageText="&lt;&lt;" PageButtonCount="10"
                                                            BackColor="#284775" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
                                                        <Columns>
                                                            <asp:TemplateColumn>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="TempLabel" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                                <HeaderStyle Width="30px" />
                                                            </asp:TemplateColumn>
                                                            <asp:BoundColumn DataField="RptKey" HeaderText="编号" />
                                                            <asp:BoundColumn DataField="RptName" HeaderText="名称" />
                                                            <asp:BoundColumn DataField="CltKey" HeaderText="所属集中器编号" />
                                                            <asp:BoundColumn DataField="SsrNumber" HeaderText="传感器数" />
                                                            <asp:TemplateColumn HeaderText="当前状态">
                                                                <ItemTemplate>
                                                                   <%#commfuncs.Search.SearchBL.GetSpRptStateDes(DataBinder.Eval(Container, "DataItem.RptKey").ToString())%>
                                                                </ItemTemplate>
                                                            </asp:TemplateColumn>
                                                        </Columns>
                                                        <ItemStyle ForeColor="#333333" BackColor="#F7F6F3"></ItemStyle>
                                                        <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                        <HeaderStyle ForeColor="White" BackColor="#5D7B9D" Font-Bold="True"></HeaderStyle>
                                                        <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                                                        <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                                                        <EditItemStyle BackColor="#999999" />
                                                    </cc1:GridViewPlus2>
                                                </asp:View>
                                                <asp:View ID="View3" runat="server">
                                                    <cc1:GridViewPlus2 ID="GridViewPlus2" runat="server" Width="100%" AllowCustomPaging="True"
                                                        AllowPaging="True" AutoGenerateColumns="False" PageSize="15" CellPadding="4"
                                                        ForeColor="#333333" GridLines="None" BorderColor="#657F93" BorderStyle="Solid"
                                                        BorderWidth="1px">
                                                        <PagerStyle NextPageText="&gt;&gt;" PrevPageText="&lt;&lt;" PageButtonCount="10"
                                                            BackColor="#284775" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
                                                        <Columns>
                                                            <asp:TemplateColumn>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="TempLabel" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                                <HeaderStyle Width="30px" />
                                                            </asp:TemplateColumn>
                                                            <asp:BoundColumn DataField="SsrKey" HeaderText="编号" />
                                                            <asp:BoundColumn DataField="SsrName" HeaderText="名称" />
                                                            <asp:BoundColumn DataField="STPID" HeaderText="所属设备编号" />
                                                            <asp:BoundColumn DataField="cbt" HeaderText="机柜" />
                                                            <asp:BoundColumn DataField="Temperature" HeaderText="最后温度" />
                                                            <asp:TemplateColumn HeaderText="当前状态">
                                                                <ItemTemplate>
                                                                    <%#commfuncs.Search.SearchBL.GetSpSsrStateDes(DataBinder.Eval(Container, "DataItem.SsrState").ToString())%>
                                                                </ItemTemplate>
                                                            </asp:TemplateColumn>
                                                        </Columns>
                                                        <ItemStyle ForeColor="#333333" BackColor="#F7F6F3"></ItemStyle>
                                                        <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                        <HeaderStyle ForeColor="White" BackColor="#5D7B9D" Font-Bold="True"></HeaderStyle>
                                                        <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                                                        <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                                                        <EditItemStyle BackColor="#999999" />
                                                    </cc1:GridViewPlus2>
                                                </asp:View>
                                            </asp:MultiView>
                                        </td>
                                    </tr>
                                </table>
                            </asp:View>
                        </asp:MultiView>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</asp:Content>
